package com.edu.utils;

import java.util.UUID;

/**
 * @author ZCN
 * @version 1.0
 * @date 2021/11/23 16:28
 */
// 订单编号生成工具类
public class OrderSnUtil {
    public static String order(){
        int hashCodeV = UUID.randomUUID().toString().hashCode();
        if(hashCodeV < 0) {//有可能是负数
            hashCodeV = - hashCodeV;
        }
        String s = String.format("%010d", hashCodeV);
        return s;
    }
}
